3.74 \(\int (e x)^{-1+2 n} (a+b \csc (c+d x^n)) \, dx\)

Optimal. Leaf size=141 \[ \frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,-e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}+\frac{a (e x)^{2 n}}{2 e n}-\frac{2 b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n} \]

[Out]

(a*(e*x)^(2*n))/(2*e*n) - (2*b*(e*x)^(2*n)*ArcTanh[E^(I*(c + d*x^n))])/(d*e*n*x^n) + (I*b*(e*x)^(2*n)*PolyLog[
2, -E^(I*(c + d*x^n))])/(d^2*e*n*x^(2*n)) - (I*b*(e*x)^(2*n)*PolyLog[2, E^(I*(c + d*x^n))])/(d^2*e*n*x^(2*n))

________________________________________________________________________________________

Rubi [A]  time = 0.108862, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {14, 4209, 4205, 4183, 2279, 2391} \[ \frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,-e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac{i b x^{-2 n} (e x)^{2 n} \text{PolyLog}\left (2,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}+\frac{a (e x)^{2 n}}{2 e n}-\frac{2 b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + 2*n)*(a + b*Csc[c + d*x^n]),x]

[Out]

(a*(e*x)^(2*n))/(2*e*n) - (2*b*(e*x)^(2*n)*ArcTanh[E^(I*(c + d*x^n))])/(d*e*n*x^n) + (I*b*(e*x)^(2*n)*PolyLog[
2, -E^(I*(c + d*x^n))])/(d^2*e*n*x^(2*n)) - (I*b*(e*x)^(2*n)*PolyLog[2, E^(I*(c + d*x^n))])/(d^2*e*n*x^(2*n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 4209

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*x
)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Csc[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rule 4205

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4183

Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E^(I*(e + f*
x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[(d*m)/f, Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int (e x)^{-1+2 n} \left (a+b \csc \left (c+d x^n\right )\right ) \, dx &=\int \left (a (e x)^{-1+2 n}+b (e x)^{-1+2 n} \csc \left (c+d x^n\right )\right ) \, dx\\ &=\frac{a (e x)^{2 n}}{2 e n}+b \int (e x)^{-1+2 n} \csc \left (c+d x^n\right ) \, dx\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \int x^{-1+2 n} \csc \left (c+d x^n\right ) \, dx}{e}\\ &=\frac{a (e x)^{2 n}}{2 e n}+\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int x \csc (c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}-\frac{2 b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}-\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \log \left (1-e^{i (c+d x)}\right ) \, dx,x,x^n\right )}{d e n}+\frac{\left (b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \log \left (1+e^{i (c+d x)}\right ) \, dx,x,x^n\right )}{d e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}-\frac{2 b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac{\left (i b x^{-2 n} (e x)^{2 n}\right ) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}\\ &=\frac{a (e x)^{2 n}}{2 e n}-\frac{2 b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac{i b x^{-2 n} (e x)^{2 n} \text{Li}_2\left (-e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac{i b x^{-2 n} (e x)^{2 n} \text{Li}_2\left (e^{i \left (c+d x^n\right )}\right )}{d^2 e n}\\ \end{align*}

Mathematica [A]  time = 0.219189, size = 185, normalized size = 1.31 \[ \frac{x^{-2 n} (e x)^{2 n} \left (2 i b \text{PolyLog}\left (2,-e^{i \left (c+d x^n\right )}\right )-2 i b \text{PolyLog}\left (2,e^{i \left (c+d x^n\right )}\right )+a d^2 x^{2 n}+2 b d x^n \log \left (1-e^{i \left (c+d x^n\right )}\right )-2 b d x^n \log \left (1+e^{i \left (c+d x^n\right )}\right )+2 b c \log \left (1-e^{i \left (c+d x^n\right )}\right )-2 b c \log \left (1+e^{i \left (c+d x^n\right )}\right )-2 b c \log \left (\tan \left (\frac{1}{2} \left (c+d x^n\right )\right )\right )\right )}{2 d^2 e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + 2*n)*(a + b*Csc[c + d*x^n]),x]

[Out]

((e*x)^(2*n)*(a*d^2*x^(2*n) + 2*b*c*Log[1 - E^(I*(c + d*x^n))] + 2*b*d*x^n*Log[1 - E^(I*(c + d*x^n))] - 2*b*c*
Log[1 + E^(I*(c + d*x^n))] - 2*b*d*x^n*Log[1 + E^(I*(c + d*x^n))] - 2*b*c*Log[Tan[(c + d*x^n)/2]] + (2*I)*b*Po
lyLog[2, -E^(I*(c + d*x^n))] - (2*I)*b*PolyLog[2, E^(I*(c + d*x^n))]))/(2*d^2*e*n*x^(2*n))

________________________________________________________________________________________

Maple [C]  time = 0.658, size = 739, normalized size = 5.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n)),x)

[Out]

1/2*a/n*x*exp(1/2*(-1+2*n)*(-I*Pi*csgn(I*e*x)^3+I*Pi*csgn(I*e*x)^2*csgn(I*e)+I*Pi*csgn(I*e*x)^2*csgn(I*x)-I*Pi
*csgn(I*e*x)*csgn(I*e)*csgn(I*x)+2*ln(e)+2*ln(x)))+b*(e^n)^2/e/n/d*(-1)^(-1/2*csgn(I*e)*csgn(I*e*x)^2)*(-1)^(-
1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*x^n*ln(1-exp(I*(c+d*x^n)))*exp(-1/2*I*
Pi*csgn(I*e*x)*(2*n*csgn(I*e*x)^2-2*n*csgn(I*e)*csgn(I*e*x)-2*n*csgn(I*x)*csgn(I*e*x)+2*n*csgn(I*e)*csgn(I*x)-
csgn(I*e*x)^2))-b*(e^n)^2/e/n/d*(-1)^(-1/2*csgn(I*e)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(
1/2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*x^n*ln(exp(I*(c+d*x^n))+1)*exp(-1/2*I*Pi*csgn(I*e*x)*(2*n*csgn(I*e*x)^2-2
*n*csgn(I*e)*csgn(I*e*x)-2*n*csgn(I*x)*csgn(I*e*x)+2*n*csgn(I*e)*csgn(I*x)-csgn(I*e*x)^2))-I*b*(e^n)^2/e/n/d^2
*(-1)^(-1/2*csgn(I*e)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)*csgn(I*x)*csgn(I*
e*x))*dilog(1-exp(I*(c+d*x^n)))*exp(-1/2*I*Pi*csgn(I*e*x)*(2*n*csgn(I*e*x)^2-2*n*csgn(I*e)*csgn(I*e*x)-2*n*csg
n(I*x)*csgn(I*e*x)+2*n*csgn(I*e)*csgn(I*x)-csgn(I*e*x)^2))+I*b*(e^n)^2/e/n/d^2*(-1)^(-1/2*csgn(I*e)*csgn(I*e*x
)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*dilog(exp(I*(c+d*x^n))+1)*
exp(-1/2*I*Pi*csgn(I*e*x)*(2*n*csgn(I*e*x)^2-2*n*csgn(I*e)*csgn(I*e*x)-2*n*csgn(I*x)*csgn(I*e*x)+2*n*csgn(I*e)
*csgn(I*x)-csgn(I*e*x)^2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.587936, size = 979, normalized size = 6.94 \begin{align*} \frac{a d^{2} e^{2 \, n - 1} x^{2 \, n} - b d e^{2 \, n - 1} x^{n} \log \left (\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + 1\right ) - b d e^{2 \, n - 1} x^{n} \log \left (\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + 1\right ) - b c e^{2 \, n - 1} \log \left (-\frac{1}{2} \, \cos \left (d x^{n} + c\right ) + \frac{1}{2} i \, \sin \left (d x^{n} + c\right ) + \frac{1}{2}\right ) - b c e^{2 \, n - 1} \log \left (-\frac{1}{2} \, \cos \left (d x^{n} + c\right ) - \frac{1}{2} i \, \sin \left (d x^{n} + c\right ) + \frac{1}{2}\right ) - i \, b e^{2 \, n - 1}{\rm Li}_2\left (\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right )\right ) + i \, b e^{2 \, n - 1}{\rm Li}_2\left (\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right )\right ) - i \, b e^{2 \, n - 1}{\rm Li}_2\left (-\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right )\right ) + i \, b e^{2 \, n - 1}{\rm Li}_2\left (-\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right )\right ) +{\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (-\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + 1\right ) +{\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (-\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + 1\right )}{2 \, d^{2} n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n)),x, algorithm="fricas")

[Out]

1/2*(a*d^2*e^(2*n - 1)*x^(2*n) - b*d*e^(2*n - 1)*x^n*log(cos(d*x^n + c) + I*sin(d*x^n + c) + 1) - b*d*e^(2*n -
 1)*x^n*log(cos(d*x^n + c) - I*sin(d*x^n + c) + 1) - b*c*e^(2*n - 1)*log(-1/2*cos(d*x^n + c) + 1/2*I*sin(d*x^n
 + c) + 1/2) - b*c*e^(2*n - 1)*log(-1/2*cos(d*x^n + c) - 1/2*I*sin(d*x^n + c) + 1/2) - I*b*e^(2*n - 1)*dilog(c
os(d*x^n + c) + I*sin(d*x^n + c)) + I*b*e^(2*n - 1)*dilog(cos(d*x^n + c) - I*sin(d*x^n + c)) - I*b*e^(2*n - 1)
*dilog(-cos(d*x^n + c) + I*sin(d*x^n + c)) + I*b*e^(2*n - 1)*dilog(-cos(d*x^n + c) - I*sin(d*x^n + c)) + (b*d*
e^(2*n - 1)*x^n + b*c*e^(2*n - 1))*log(-cos(d*x^n + c) + I*sin(d*x^n + c) + 1) + (b*d*e^(2*n - 1)*x^n + b*c*e^
(2*n - 1))*log(-cos(d*x^n + c) - I*sin(d*x^n + c) + 1))/(d^2*n)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (e x\right )^{2 n - 1} \left (a + b \csc{\left (c + d x^{n} \right )}\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+2*n)*(a+b*csc(c+d*x**n)),x)

[Out]

Integral((e*x)**(2*n - 1)*(a + b*csc(c + d*x**n)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \csc \left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{2 \, n - 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((b*csc(d*x^n + c) + a)*(e*x)^(2*n - 1), x)